<script setup lang="ts">
import { onMounted, useTemplateRef } from 'vue';
import gsap from 'gsap';

const boxRef = useTemplateRef<HTMLElement>('box');
const tl = gsap.timeline();
onMounted(() => {
    tl.to(boxRef.value!, { x: 200, duration: 1, rotation: 360 });
});
</script>

<template>
    <div class="example">
        <svg>
            <defs>
                <filter id="blur">
                    <feGaussianBlur stdDeviation="5" />
                </filter>
            </defs>
        </svg>
        <img src="@/assets/author_avatar.png" alt="" />
    </div>
</template>

<style scoped lang="scss">
.example {
    width: 100px;
    height: 100px;
    background-color: coral;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;

    img {
        width: 100px;
        height: 100px;
        filter: url(#blur);
    }
}
</style>
